package com.nycreativity.elecreativity.entity.dto

import com.fasterxml.jackson.annotation.JsonIgnore
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import org.springframework.util.ObjectUtils

@ApiModel("goods规格json串对应的实体类")
class GoodsSpecificationDTO {

    @ApiModelProperty("尺寸")
    var size: MutableList<String>? = null

    @ApiModelProperty("颜色")
    var color: MutableList<String>? = null

    @JsonIgnore
    fun isEmpty(): Boolean {
        return ObjectUtils.isEmpty(size) && ObjectUtils.isEmpty(color)
    }

}